using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour 
{
    public float movementSpeed;

    void Update()
    {
        transform.Translate(Vector3.forward * movementSpeed * Time.deltaTime);
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag != "Turret")
        {
            if (other.gameObject.tag == "Target")
            {
                other.gameObject.GetComponent<Target>().HitTarget();
            }
            Destroy(gameObject);
        }
    }

}
